package com.ruibang.glass.sale.controller;


import com.ruibang.glass.sale.domain.req.GSaleDisputeReq;
import com.ruibang.glass.sale.domain.req.GSaleOrderReq;
import com.ruibang.glass.sale.entity.GSaleDispute;
import com.ruibang.glass.sale.mapper.GSaleDisputeProductMapper;
import com.ruibang.glass.sale.service.GSaleDisputeService;
import com.ruibang.glass.sale.service.GSaleOrderManagementService;
import com.ruibang.glass.sale.service.GSaleReturnExchangeOrderService;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * @author mameng
 */
@Api(tags = "待结算")
@RestController
@RequestMapping("/api/glass/sale/to/settled")
public class GSaleToSettledController {

    @Autowired
    private GSaleOrderManagementService gSaleOrderManagementService;

    @PostMapping("list")
    @ApiOperation(value = "待结算单列表", response = ResultBody.class)
    public ResultBody list(@RequestBody GSaleOrderReq gSaleOrderReq) {
        return ResultBody.success(gSaleOrderManagementService.getGSaleToBeSettledDTOPage(gSaleOrderReq));
    }

    @GetMapping("getDetail/{id}")
    @ApiOperation(value = "待结算单列表", response = ResultBody.class)
    public ResultBody getDetail(@PathVariable("id")String id) {
        return ResultBody.success(gSaleOrderManagementService.getGSaleToBeSettledDTODetail(id));
    }



}
